<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>延迟执行</title>
</head>

<body>
    <button id="btn">你过来呀</button>
</body>

</html>
<script>
    window.addEventListener('DOMContentLoaded', function(e) {
        let btn = window.document.querySelector('#btn');
        btn.addEventListener('click', function(e) {
            // function (e) {  } 可以使用this
            // () => {  } 不可以使用this
            setTimeout(function() {
                window.alert('刘晓兰');
            }, 1000 * 5);

        });
    });
</script>